PROJECT (libaprs3)

SET (VERSION_PREFIX "SVN")

SET (CMAKE_BUILD_TYPE Debug)
SET (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build")

CONFIGURE_FILE (
    ${CMAKE_SOURCE_DIR}/libaprs3/aprs3_version.h.cmake
    ${CMAKE_BINARY_DIR}/aprs3_version.h
)

FIND_PACKAGE (APR     REQUIRED)
FIND_PACKAGE (APRUtil REQUIRED)
FIND_PACKAGE (OpenSSL REQUIRED)
FIND_PACKAGE (Serf    REQUIRED)
FIND_PACKAGE (LibXml2 REQUIRED)

INCLUDE_DIRECTORIES (
    ${APR_INCLUDES} 
    ${APRUTIL_INCLUDES} 
    ${SERF_INCLUDES} 
    ${LIBXML2_INCLUDE_DIR} 
    ${CMAKE_SOURCE_DIR}/libaprs3
    ${CMAKE_BINARY_DIR}
)

ADD_DEFINITIONS (${APR_FLAGS} ${LIBXML2_DEFINITIONS})

LINK_LIBRARIES (${APR_LIBS} ${APRUTIL_LIBS} ${SERF_LIBRARIES}
    ${OPENSSL_LIBRARIES} ${LIBXML2_LIBRARIES} -lcrypto)

SUBDIRS (libaprs3 bin)
